package io.xccit.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

@Component
@Data
@TableName("sys_user") //通过注解将实体类和表名映射起来
public class User implements Serializable {
    private Integer id;
    private String username;
//    @JsonIgnore //忽略此字段 向前端响应时Json中不会显示
    private String password;
    private String email;
    private String nickname;
    private String phone;
    private String address;
    private Date createTime;
    @TableField("avatar_url") //avatar字段对应数据表中的avatar_url字段
    private String avatar;
}
